package cn.diancan.model.types;

/**
 * 动态类型
 * @author Sky
 *
 */
public final class DycType{
    
    /**未知*/
    public final static int UNKNOWN=0;
    /** 文字 */
    public final static int TXT = 1;
    /** 图片 */
    public final static int IMG = 2;
    /** 图文 */
    public final static int TXTANDIMG = 3;
    
    /**
     * 是否有图片
     * @param dycType
     * @return
     */
    public final static boolean hasImage(Integer dycType){
	if(null == dycType){
	    return false;
	}
	if(dycType.equals(IMG) || dycType.equals(TXTANDIMG)){
	    return true;
	}
	return false;
    }
    
    /**
     * 是否有文字
     * @param dycType
     * @return
     */
    public final static boolean hasTxt(Integer dycType){
	if(null == dycType){
	    return false;
	}
	if(dycType.equals(TXT) || dycType.equals(TXTANDIMG)){
	    return true;
	}
	return false;
    }
    
}